package cn.itcast.bos.service.base;

import java.util.Date;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import org.jboss.logging.Param;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import cn.itcast.bos.domain.page.PageBean;
import cn.itcast.bos.domain.take_delivery.Promotion;

public interface PromotionService {
	//保存宣传任务
	public void save(Promotion model);
	//分页查询
	public Page<Promotion> findAll(Pageable pageable);

	//根据page和row返回分页数据(即页脚)
	@Path("/pageQuery")
	@GET
	@Produces({"application/xml","application/json"})
	PageBean<Promotion> findPageDate(@QueryParam("page") int page
			,@QueryParam("rows") int rows);
	
	//根据id查找相应的产品
	@Path("promotion/{id}")
	@GET
	@Produces({"application/xml","application/json"})
	public Promotion findById(@PathParam("id") Integer id);
	//设置活动过期
	public void updateStatus(Date date);
	
	
	
}
